package com.zsx;

import com.BaseTest;
import com.angel.bean.CmsInfo;
import com.angel.service.CmsInfoService;
import org.junit.Test;

import javax.annotation.Resource;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;

public class testClasss extends BaseTest {

    @Resource
    private CmsInfoService cmsInfoService;

    Map<Object, Object> map = new HashMap<Object, Object>();

    // 添加文章
    @Test
    public void addCmsInfo() {

        CmsInfo cmsInfo = new CmsInfo();

        cmsInfo.setRelsDate(new Timestamp(System.currentTimeMillis()));
        cmsInfo.setState(1);
        cmsInfo.setContent("而绝非网络咖啡屋呢封你为哦封你为");
        int result = cmsInfoService.insertSelective(cmsInfo);

        if (result != 0) {
            System.out.println("-----添加成功");
        }
    }


}
